package com.xxgc.zde.service;

import com.baomidou.mybatisplus.core.toolkit.AES;

public class TestPassword {
    public static void main(String[] args) {
        // 生成16位随机AES密钥
        String randomKey = "sododndjfnfikcdi";
        String url="jdbc:mysql://8.156.66.18/zde?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC";
        String name="root";
        String password="0230755@Abc .";


        String encryptedURL = AES.encrypt(url, randomKey);
        String encryptedName = AES.encrypt(name, randomKey);
        String encryptedPassword = AES.encrypt(password, randomKey);

        System.out.println("密钥：" + randomKey);
        System.out.println("加密后的URL：" + encryptedURL);
        System.out.println("加密后的用户名：" + encryptedName);
        System.out.println("加密后的密码：" + encryptedPassword);
    }
}
